import Vue from "vue";
import ELEMENT from "ELEMENT";
import App from "./app/view/pages/index.vue";
import router from "./app/router/index.js";
import store from "./app/vuex/index";
import dayjs from "dayjs";
import * as echarts from "echarts";
import { RequestPlugin } from "./app/plugins";
import VueCookies from "vue-cookies";
Vue.use(VueCookies);
// 项目全局组件
import DComponents from "./app/components";
Vue.use(DComponents);

Vue.use(ELEMENT);

Vue.prototype.$bus = new Vue();
Vue.prototype.$echarts = echarts;

Vue.filter("format", function(val) {
  if (!val) return "";
  return dayjs(val).format("YYYY-MM-DD HH:mm:ss");
});

Vue.use(RequestPlugin);

Vue.config.productionTip = false;
Vue.config.devtools = true;

// store.dispatch("getProjectList");

new Vue({
  store,
  router,
  render: h => h(App)
}).$mount("#app");
